-
Couldn't load subscription status.
- Fork 6
ci: add api doc generation #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable
Are you sure you want to change the base?
Conversation
WalkthroughThis update introduces automated generation of Python SDK API documentation using the Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant CI as GitHub Actions CI
participant Task as Invoke Task
participant Mdxify as mdxify Tool
participant Docs as Documentation Output
Dev->>CI: Push/PR changes (Python or docs)
CI->>Task: Run generate-sdk-api-docs
Task->>Mdxify: Generate API docs for SDK modules
Mdxify-->>Task: Output .mdx files
Task->>Docs: Organize and move .mdx files
Task->>Task: Optionally run markdownlint
Task-->>CI: Complete doc generation
CI->>CI: Check for uncommitted doc changes
CI-->>Dev: Report status/checks
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
♻️ Duplicate comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1)
10-10: Same Icon component consideration applies here.As with other documentation files, verify that the Icon component usage is compatible with Docusaurus MDX processing.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx (1)
10-12: Same permalink drift issue as other MDX filesUpdate link generation to use commit SHAs or drop line anchors to keep docs stable over time.
🧹 Nitpick comments (71)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx (1)
1-4: Use the standard Docusaurus front-matter keysidebar_labelinstead ofsidebarTitle.
sidebarTitleis not recognised by Docusaurus v2; the expected key issidebar_label.
Switching prevents the page from being hidden in the generated sidebar.-title: constants -sidebarTitle: constants +title: constants +sidebar_label: constantsdocs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx (1)
1-4: Align front-matter with Docusaurus conventions.Same comment as above – replace
sidebarTitlewithsidebar_labelto guarantee proper sidebar rendering.-title: cli -sidebarTitle: cli +title: cli +sidebar_label: clidocs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx (2)
1-4: Sidebar label key mismatch.Update the key for consistency:
-title: playback -sidebarTitle: playback +title: playback +sidebar_label: playback
6-25: Add a brief module & class description for better discoverability.The page jumps straight into signatures. Two short sentences explaining what
infrahub_sdk.playbackdoes and typicalJSONPlaybackuse-cases (e.g., “record/replay HTTP traffic for offline tests”) will greatly help readers.No code diff provided since the text can be placed directly after the H1.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx (2)
1-4: Update front-matter key.-title: exceptions -sidebarTitle: exceptions +title: exceptions +sidebar_label: exceptions
8-18: Consider adding one-line summaries for each exception.Readers benefit from seeing at a glance why each custom exception exists (e.g., file-already-exists vs. invalid namespace).
Example:### `TransferError` _Base class for all transfer-related errors._docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx (2)
1-4: Usesidebar_labelfor sidebar entry.-title: object_store -sidebarTitle: object_store +title: object_store +sidebar_label: object_store
10-42: Provide high-level context & return-value notes.A short paragraph describing what an “Object Store” is and clarifying what the
uploadmethod returns (e.g., signed URL, handle, etc.) will improve clarity.Also, consider grouping async vs sync variants explicitly so users understand when to pick each.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (2)
60-64: Copy-paste description does not match the exception.
InvalidResponseErrorinherits fromErrorbut the description “Raised when an object requires an initialization step before use” is clearly forUninitializedError. Update the sentence (or remove it) so users are not mis-led when debugging API failures.
54-64: Repeated sentences make the prose look autogenerated.Three consecutive blocks start with “Raised when …”. Varying the wording (or using a short, single-sentence list style) will read better and avoids the LanguageTool warning in the CI hints.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx (1)
6-9: Empty-module notice is fine but consider hiding the page.If the module truly has no public surface, you may omit it from the sidebar to avoid a “nothing to see here” experience, or generate it only when content exists.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx (1)
8-11: Minor completeness nit: list functions/constants too.
infrahub_sdk.template.filtersalso exports helper functions alongsideFilterDefinition. Including them will give users a full view of the module.docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx (1)
8-11: Add the enum members for real usefulnessThe page stops at the class heading; without listing
InfrahubClientModemembers (e.g.,SYNC,ASYNC, …) consumers still have to open the source. Consider appending a fenced block or a bullet list enumerating the available modes.### `InfrahubClientMode` …</sup> +```python +class InfrahubClientMode(Enum): + SYNC = "sync" + ASYNC = "async" +``` + +| Member | Meaning | +| ------ | ------- | +| `SYNC` | Blocking client that executes operations synchronously. | +| `ASYNC`| Non-blocking client using asyncio under the hood. |docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx (1)
16-24: Link theReporeturn type to its origin for clarity
Repocomes fromgitpython. A quick hint prevents readers from guessing.```python initialize_repo(self) -> Repo+
Reporefers togit.Repofrom the GitPython package.</blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx (1)</summary><blockquote> `8-16`: **Provide one-line descriptions for each exception** Listing names alone forces readers into source code. Add a short rationale per exception. ```diff ### `TaskError` …</sup> +Generic base class for all task-related errors. ### `TaskNotFoundError` …</sup> +Raised when a task with the requested ID does not exist. ### `TooManyTasksError` …</sup> +Thrown when a query returns more tasks than expected or allowed. ### `TaskNotCompletedError` …</sup> +Indicates that an awaited task is still in progress.docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx (1)
18-28: Avoid duplicate headings for thevaluepropertyTwo separate “
value” entries are rendered – one for the getter and one for the setter – but both appear as ordinary methods. This is slightly confusing because the implementation is actually a@propertywith a corresponding@value.setter.Consider collapsing them into a single heading (e.g. “
valueproperty”) and, inside that section, documenting the getter / setter behavior.
That keeps the reference concise and avoids giving the impression that two overloads must be called directly.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx (1)
10-16: Generic base class name may cause ambiguityUsing an unconstrained name like
Errorfor the project’s base exception can be confusing when scanning stack traces – it conveys almost no project context.
Unless this is locked in by API guarantees, consider renaming to something that is immediately recognisable, e.g.InfraHubError.docs/src/theme/MDXComponents.js (1)
4-10: Minor inconsistencies & bundle-size consideration
The comment says “available in MDX as
<icon />”, but the export key isIcon, so usage will actually be<Icon />.
Update the comment to avoid confusion.The remark “Import the entire Iconify library” is slightly misleading –
@iconify/reactonly ships theIconcomponent wrapper, not every icon.
Still, including Iconify can noticeably increase the docs bundle. If bundle size becomes an issue, look at:
@iconify/react/dist/iconify/icon.js(tree-shakable subset)- Dynamic imports for rarely-used icons.
-import { Icon } from '@iconify/react'; // Import the entire Iconify library. +import { Icon } from '@iconify/react'; // Makes <Icon /> available in MDX.docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx (1)
8-18: Add concise class & method summaries to improve usabilityThe page lists
RepositoryBranchInfo,RepositoryData, andget_staging_branch, but provides no short explanation of what each class / method represents or when to use it. A one-sentence summary under every heading dramatically improves discoverability when browsing the generated sidebar.docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx (1)
8-14: Document parameters & return value
group_add_subscriberexposes four parameters and adictreturn type, yet no information is given about expected shapes (e.g. subscriber list contents, branch semantics, structure of the returned dictionary). Consider adding a short “Parameters / Returns” block.docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx (1)
8-10: Missing class description
UndefinedJinja2Erroris listed without context. Including what triggers this error and typical handling guidance would save users a round-trip to the source.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx (1)
16-20: Return typeNonemay hide useful outputIf
list_generatorsprints to stdout rather than returning data, note this explicitly; otherwise consider returning the list so callers can programmatically consume it.docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx (1)
10-14: Provide examples for tricky parsing rules
parse_human_friendly_idis central to node look-ups but the docs lack concrete examples (e.g.'user:john.doe' -> ('user', ['john', 'doe'])). Two or three examples would make the behaviour immediately clear.docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1)
10-17: Avoid hard-wiring themainbranch in GitHub source linksThe generated links point explicitly to
…blob/main/….
If users browse a versioned site (e.g. a tagged release or an older branch), the links will always jump tomain, which may no longer match the rendered signature.Prefer injecting the current commit SHA (or the branch/tag used during doc build) so the source link always reflects the exact code that was documented.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1)
12-20: Consider shortening long signatures for readabilityVery long one-liners tend to wrap in narrow view-ports and hurt readability.
A common pattern is:```python title="signature" initialize_client( branch: str | None = None, identifier: str | None = None, … ) -> InfrahubClientNot mandatory, but improves UX. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx (1)</summary><blockquote> `10-18`: **Minor style nit – add back-ticks around parameter types** For consistency with other auto-generated pages, wrap type names in ``` `Path` ``` and ``` `str` ``` inside the signature so they render monospace. Purely cosmetic. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx (1)</summary><blockquote> `12-30`: **Add concise descriptions & param/return details for each method** Right now the section lists the signatures only. A one-line summary plus an *Args / Returns* block would make the generated docs far more useful to readers skimming for behaviour, without having to open the source link each time. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx (1)</summary><blockquote> `10-37`: **Document parameters, options, and possible errors** `load`/`validate` expose several Typer options (`paths`, `debug`, `branch`, config param) but the reference omits any explanation of what they do or which CLI flags map to them. Adding a short bullet list (and mentioning raised exceptions) would align this page with the rest of the ctl docs and help CLI users quickly understand usage. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx (1)</summary><blockquote> `10-20`: **Include purpose/usage examples for helper utilities** Both `list_jinja2_transforms` and `print_template_errors` are utility helpers whose usefulness is not obvious from the signature alone. A two-sentence description or minimal code snippet (e.g. how to call them from a script) would greatly improve discoverability. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx (1)</summary><blockquote> `10-37`: **Provide argument descriptions for consistency with other ctl pages** The `menus`, `debug`, `branch`, and config arguments are undocumented here, whereas parallel pages (e.g. *branch*, *object*) include at least a brief explanation. Adding those keeps the generated reference consistent and avoids reader confusion. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx (1)</summary><blockquote> `12-18`: **Explain the return structure of `get_sorted_node_schema`** The method returns `list[set[str]]`, but the semantics (order guarantees, meaning of the inner sets) are not described. A short *Returns* section clarifying this would prevent misuse. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (2)</summary><blockquote> `20-56`: **Avoid repetitive phrasing in method descriptions** Six consecutive method descriptions start with “Send a … event.” Language-Tool rightfully flags the repetition; varying the phrasing or dropping the verb entirely (“Debug event”, “Info event”, …) makes the page read less mechanical. No functional impact, but quick to improve user experience and perceived polish. --- `10-18`: **Missing class summaries** Only the header and GitHub link are rendered for each class (`HTTPMethod`, `RequesterTransport`, …) without even a one-line synopsis of what the class represents. Readers landing here have to click through to source to know if they’re in the right place. If docstrings exist, configure `mdxify` to emit the first sentence; otherwise add a terse manual summary. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx (1)</summary><blockquote> `10-34`: **Add brief descriptions for new classes** `InfrahubMenuFileData` and `MenuFile` headers render without any explanatory text. Even a single sentence lifted from the class docstring (e.g., “Pydantic model for menu-spec files”) helps give context. </blockquote></details> <details> <summary>docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx (1)</summary><blockquote> `10-15`: **Refine base-exception description** The sentence “pytest-infrahub Base exception.” reads awkward. Consider: ```diff -pytest-infrahub Base exception. +Base class for all pytest-infrahub exceptions.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx (1)
10-32: Prefer commit-pinned GitHub permalinks instead ofmainbranch anchorsAll source links target
.../blob/main/...#LXX.
If the file later changes, the line anchors will drift and the link will drop the visitor in the wrong place.
Using a short (or full) commit SHA in the URL guarantees the anchor always resolves to the exact line that was documented.Example:
-https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/pytest_plugin/plugin.py#L15 +https://github.com/opsmill/infrahub-sdk-python/blob/<COMMIT_SHA>/infrahub_sdk/pytest_plugin/plugin.py#L15
mdxifysupports injecting the current git SHA; if it is not already available, consider extending the generator (or a post-processing step) to rewrite the links.
This is cosmetic but avoids subtle “where am I?” moments for readers.docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx (1)
10-88: Stabilise source links with commit SHAsSame remark as for
pytest_plugin/plugin.mdx: every anchor relies on the mutablemainbranch.
Pinning to a commit (or tag) removes the risk of stale / shifted anchors when the file evolves.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx (1)
20-35: Long signature is hard-wrapped; consider breaking lines for readabilityThe rendered MDX line for
validate_graphqlis >180 chars which makes horizontal scrolling likely on smaller view-ports.
mdxifycan insert\line continuations or wrap the parameters on multiple lines inside the code block to improve readability without affecting copy-paste:-validate_graphql(query: str, variables: Optional[list[str]] = typer.Argument(None, help='Variables to pass along with the query. Format key=value key=value.'), debug: bool = typer.Option(False, help='Display more troubleshooting information.'), branch: str = typer.Option(None, help='Branch on which to validate the GraphQL Query.'), _: str = CONFIG_PARAM, out: str = typer.Option(None, help='Path to a file to save the result.')) -> None +validate_graphql( + query: str, + variables: Optional[list[str]] = typer.Argument( + None, + help='Variables to pass along with the query. Format key=value key=value.', + ), + debug: bool = typer.Option(False, help='Display more troubleshooting information.'), + branch: str = typer.Option(None, help='Branch on which to validate the GraphQL Query.'), + _: str = CONFIG_PARAM, + out: str = typer.Option(None, help='Path to a file to save the result.'), +) -> NoneMinor, but it noticeably boosts legibility.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx (1)
10-36: Consistent return-type wording
skip_versionalready states “Check if a test should be skipped…”.
Forclient/client_sync, adding a one-liner (“Return an async/sync Infrahub client bound to the running Docker instance.”) would align with the concise descriptive style used elsewhere and give context to newcomers skimming the docs.docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx (1)
18-46: Missing short descriptions for methodsEach method is listed with its signature but no accompanying description, unlike other sections (e.g.,
skip_version). Adding a sentence or two explaining what the method does (not just how) will make this page self-contained and quicker to digest.Example:
#### `repo` Return the underlying `GitRepoManager` instance handling low-level git operations.Auto-generation could pull the method docstring when available.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx (1)
41-44: Replace “check” with “transform” to avoid confusionThe sentence still talks about “the result of the check”; this looks like a copy-paste from the checks docs and is misleading in the context of a transform.
-The result of the check is determined based on the presence or not of ERROR log messages. +The result of the transform is determined based on the presence or absence of ERROR log messages.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)
57-63: Parameter name, default value and typo are inconsistent with the signature
- The docstring refers to
config_file_name, but the actual parameter isconfig_file.- Default file in the signature is
infrahubctl.toml, while here it statespyprojectctl.toml.- Typo:
ValidationErorr→ValidationError.-This is done to handle a ValidationErorr which is raised when settings are specified but invalid. +This is done to handle a ValidationError which is raised when settings are specified but invalid. @@ -**Args:** -- `config_file_name`: [description]. Defaults to "pyprojectctl.toml". +**Args:** +- `config_file`: Path to the TOML configuration file. Defaults to "infrahubctl.toml".docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx (1)
40-41: Nit: “digit” → “digits”Minor grammar improvement.
-Return the last 8 digit of the UUID (the most random part) +Return the last 8 digits of the UUID (the most random part)tasks.py (1)
276-282: Consider improving error handling specificity.The current error handling catches
UnexpectedExitwith exit code 127, but the error message specifically mentions Python version compatibility. Consider making the error message more generic or checking for other potential causes.except UnexpectedExit as e: if e.result.exited == 127: print( - " - mdxify is not installed, probably due to the python version being outside its supported range." + " - mdxify is not available. This could be due to it not being installed or Python version compatibility issues." ) + else: + print(f" - mdxify failed with exit code {e.result.exited}") sys.exit(1)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1)
10-12: Avoid hard-coding branch & line numbers in GitHub permalinksEvery link points to
.../blob/main/...#Lxx.
As soon as the source file changes, these anchors will drift and the docs will lead to incorrect code lines.
Generate links against a commit SHA (permalink) or drop the#Lxxfragment entirely to avoid link-rot.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx (2)
72-80: Document states “NOT IMPLEMENTED YET” – flag clearly as TODOThe
validatefunction description advertises behaviour that is “NOT IMPLEMENTED YET”.
Mark this explicitly with aTODOor@experimentalbadge so users don’t assume the feature works today.
35-36: Signature lines are extremely long – consider line-wrapping for readabilityLong, unwrapped signatures render poorly on narrow viewports and mobile docs.
Have the generator insert line breaks after each argument.docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx (1)
24-32: Missing mention that functions raiseDependencyCycleExistsError
topological_sortandget_cyclesraiseDependencyCycleExistsError, but the docs for those functions don’t reference this exception.
Add a “Raises” section so users know which errors to catch.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx (1)
18-20: Excessively long function signature hampers readabilityThe
dumpsignature is 350+ characters. Break each parameter onto its own line for easier scanning and to avoid horizontal scrolling.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx (1)
20-32: Add minimal descriptions for undocumented functionsSeveral functions (
validate_schema_content_and_exit,display_schema_load_errors,handle_non_detail_errors, …) lack any descriptive text after the code block, unlikecallback,load, andcheck. Including one-liner summaries (even if copied from the docstring) greatly improves the generated reference usability.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx (1)
14-22: Document key class attributes / behaviours
InfrahubBaseTest,InfrahubInputOutputTest, etc., are top-level abstractions but their purpose is unclear without any narrative. Consider inserting a short paragraph before the Methods list explaining the role of each class (e.g., “Base class for …”, expected usage, important attributes).docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx (1)
60-63: Missing explanation forCheckModule
CheckModuleis listed under Classes without any description or method list, unlike the functions above. Either omit the heading or add at least a short summary and public attributes/methods so readers know how to use it.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx (1)
32-38: Consider collapsing repetitive method stubs into tablesThe current layout shows many short code blocks that only repeat the signature. For long pages, converting these into a single markdown table (Method | Return type | Description) cuts vertical scroll and improves scannability.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx (1)
6-8: Consider adding an “Enums” subsection for clarity
Several entities listed below (RelationshipCardinality,BranchSupportType, …) are enumerations, not classes. Grouping them under a dedicated “## Enums” header makes the doc easier to scan.docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx (1)
51-56: Parameter name shadows Python built-infilter
The generated signature shows a parameter calledfilter. In the code this shadows Python’s built-infilter()and may confuse users or tooling. Consider renaming the argument (e.g.filters) in the source to avoid the clash; the docs will follow automatically on next generation.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx (1)
61-65: Spelling: “absolut” → “absolute”-This will be an absolute path if --infrahub-config-path is an absolut path as happens when -tests are started from within Infrahub server. +This will be an absolute path if `--infrahub-config-path` is an absolute path, as happens when +tests are started from within the Infrahub server.docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx (1)
68-72: Minor style: Avoid passive voice in class description
“Represents a RelatedNodeBase in an asynchronous context” reads clearer as “Asynchronous wrapper aroundRelatedNodeBase”.docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx (1)
30-33: Remove the double blank line to satisfy markdown-lint (MD012)Two consecutive blank lines are present, triggering the CI markdown-lint failure.
-Executes the stored task. - - +Executes the stored task. +docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx (2)
29-32: Tighten wording of the module overviewThe sentence ends with a double‐dot ellipsis and does not actually mention the object (“repositories”) it refers to.
-Manage the repositories in a remote Infrahub instance. -List, create, delete .. +Manage repositories in a remote Infrahub instance. +List, create and delete repositories.
36-38: Hide internal “_” parameter from the docstring
_: str = CONFIG_PARAMis an internal Typer context parameter and adds noise to the public API reference.
Consider excluding it during generation (e.g. via:exclude-members:or a custom mdxify filter).docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx (1)
16-21: Correct the type annotation forrender_variables_to_string
dict[str, type[str | int | float | bool]]is not valid Python typing and may confuse readers.-render_variables_to_string(data: dict[str, type[str | int | float | bool]]) -> str +render_variables_to_string(data: dict[str, str | int | float | bool]) -> strEnsure the source annotation in
infrahub_sdk/graphql.pymatches this correction so that the next doc-generation run stays consistent.docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (2)
103-107: Bullet list formatting is offThe three lines are intended as list items but render as plain text. Prefix them with “- ” to display properly.
- the intersection of both - the item present only in list1 - the item present only in list2 + - the intersection of both + - the item present only in list1 + - the item present only in list2
216-218: Typo: “seam” → “seem”-This implementation may seam counter intuitive but in the current implementation +This implementation may seem counter-intuitive, but in the current implementationdocs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)
23-23: Fix typo & tighten wording
exeception→exception, and use the adverb “differently” to avoid verbosity.-Handle exeception in a different fashion based on its type. +Handle exceptions differently based on their type.docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx (1)
23-24: Remove extra blank line to satisfy markdown-lint MD012- - +docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1)
43-47: Polish phrasing for conciseness.The introductory sentence is verbose; tightening it improves readability without losing meaning.
-Internal Store for InfrahubNode objects. - -Often while creating a lot of new objects, -we need to save them in order to reuse them later to associate them with another node for example. +Internal store for InfrahubNode objects. + +When creating many new objects, we often need to keep them so they can be reused later—for instance, when associating them with another node.docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx (2)
29-31: Clarify activation wording forstore“The store will be populated … if activated” is a bit vague. Consider a wording that specifies the flag/mechanism that enables population so that users know exactly what to set.
-The store will be populated with nodes based on the query during the collection of data if activated +The store is populated with nodes that match the query **when `populate_store=True` in the collection API**
38-47: Differentiatenodes()vsrelated_nodes()Both descriptions are identical, leaving readers unsure about the distinction between the two helpers.
Add a brief sentence highlighting what qualifies a node as “related” (relationship traversal depth, direction, etc.) or remove one if they are aliases.docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx (1)
38-43: Provide high-level purpose forschema_base
schema_baseis central to the class but the docstring is empty. Adding a one-liner (e.g. “Composes the root schema from all node-specific fragments”) helps newcomers understand why they would call this helper.docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx (1)
165-170: Fix grammar & indentation ingenerate_query_data_nodeargs listMinor markdown glitches make the bullet list hard to read:
- - `inherited`: Indicated of the attributes and the relationships inherited from generics should be included as well. - Defaults to True. + - `inherited`: Whether attributes/relationships inherited from generics are included (default **True**).Also out-dented continuation lines so bullets render correctly.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)
94-112: Collapse overloaded signatures to reduce noiseThe four consecutive
create(...)overloads make the page extremely long and difficult to scan.
Consider configuringmdxifyto hide duplicated overloads behind a collapsible section or keep only the most generic signature.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/package-lock.jsonis excluded by!**/package-lock.jsonpoetry.lockis excluded by!**/*.lock
📒 Files selected for processing (99)
.github/workflows/ci.yml(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx(1 hunks)docs/package.json(1 hunks)docs/sidebars-python-sdk.ts(2 hunks)docs/src/theme/MDXComponents.js(1 hunks)pyproject.toml(1 hunks)tasks.py(2 hunks)
🪛 GitHub Check: markdown-lint
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
[failure] 65-65: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:65 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 56-56: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:56 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
[failure] 91-91: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:91 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 82-82: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:82 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 73-73: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:73 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 40-40: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:40 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 15-15: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 12-12: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:12 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
[failure] 32-32: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx:32 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
[failure] 24-24: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx:24 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
🪛 GitHub Actions: CI
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
[error] 56-56: markdownlint MD012/no-multiple-blanks: Multiple consecutive blank lines [Expected: 1; Actual: 2]
tasks.py
[error] 261-261: Ruff FA100: Add from __future__ import annotations to simplify typing.Union usage.
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx
[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...th: 14px; height: 14px;" /> Raised when an object requires an initializati...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
[grammar] ~19-~19: Ensure spelling is correct
Context: ...stack trace and extract Frames for each expection found in the trace.
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <s...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~72-~72: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
[grammar] ~63-~63: Ensure spelling is correct
Context: ...te path if --infrahub-config-path is an absolut path as happens when tests are started from ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx
[grammar] ~23-~23: Ensure spelling is correct
Context: ...xit_code: int) -> NoReturn ``` Handle exeception in a different fashion based on its typ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[style] ~23-~23: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ...nt) -> NoReturn ``` Handle exeception in a different fashion based on its type. ### `catch_excepti...
(IN_A_X_MANNER)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx
[grammar] ~105-~105: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~106-~106: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx
[style] ~45-~45: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...
(A_LOT_OF)
[style] ~46-~46: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...
(IN_ORDER_TO_PREMIUM)
🧰 Additional context used
🪛 GitHub Check: markdown-lint
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
[failure] 65-65: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:65 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 56-56: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx:56 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
[failure] 91-91: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:91 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 82-82: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:82 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 73-73: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:73 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 40-40: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:40 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 15-15: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:15 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
[failure] 12-12: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx:12 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
[failure] 32-32: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx:32 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
[failure] 24-24: Multiple consecutive blank lines
docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx:24 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md012.md
🪛 GitHub Actions: CI
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
[error] 56-56: markdownlint MD012/no-multiple-blanks: Multiple consecutive blank lines [Expected: 1; Actual: 2]
tasks.py
[error] 261-261: Ruff FA100: Add from __future__ import annotations to simplify typing.Union usage.
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx
[style] ~56-~56: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...th: 14px; height: 14px;" /> Raised when an object requires an initializati...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
[grammar] ~19-~19: Ensure spelling is correct
Context: ...stack trace and extract Frames for each expection found in the trace.
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx
[style] ~63-~63: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <s...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~72-~72: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
[grammar] ~63-~63: Ensure spelling is correct
Context: ...te path if --infrahub-config-path is an absolut path as happens when tests are started from ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx
[grammar] ~23-~23: Ensure spelling is correct
Context: ...xit_code: int) -> NoReturn ``` Handle exeception in a different fashion based on its typ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[style] ~23-~23: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ...nt) -> NoReturn ``` Handle exeception in a different fashion based on its type. ### `catch_excepti...
(IN_A_X_MANNER)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx
[grammar] ~105-~105: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~106-~106: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx
[style] ~45-~45: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...
(A_LOT_OF)
[style] ~46-~46: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...
(IN_ORDER_TO_PREMIUM)
🔇 Additional comments (38)
docs/package.json (1)
18-22: Pin the Iconify dependency to an exact version to keep docs builds reproducible.The SDK’s docs are built in CI; using
^6.0.0means any future 6.x release could break the build unexpectedly (Iconify had breaking changes between minor versions before). Consider:- "@iconify/react": "^6.0.0", + "@iconify/react": "6.0.0",or lock via
pnpm-lock.yaml/package-lock.json.pyproject.toml (1)
22-24: If you do raise the minimum Python version, update the classifier list.Classifiers still include “Programming Language :: Python :: 3.9”. Keep the metadata consistent to avoid publishing wheels with incorrect tags.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx (1)
1-9: Documentation structure looks good for an empty module.The MDX file correctly uses frontmatter formatting and provides clear messaging that this module contains no public API elements. This approach maintains consistency in the SDK reference documentation structure.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx (2)
1-14: Documentation structure and content are well-formatted.The MDX frontmatter, class documentation, and GitHub source link are properly structured and provide clear information about the NodeProperty class.
10-10: Confirm Icon component availability in MDXOur search showed multiple
<Icon icon="github" />usages (including indocs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx) but no correspondingimport Iconor Docusaurus MDX‐components configuration. Please verify that:
- Icon is registered in your MDX provider (e.g. via
themeConfig.stylesheetsor a customMDXComponentsmapping in docusaurus.config.js),- Or add an explicit import at the top of the MDX files, for example:
import Icon from '@site/src/components/Icon'; ### `NodeProperty` <sup> <a href="…"><Icon icon="github" /></a> </sup>docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx (1)
12-14: Function signature documentation is clear and informative.The function signature with type hints and proper code block formatting provides clear documentation for the
list_transformsfunction.docs/sidebars-python-sdk.ts (2)
1-1: Import formatting improvement.The spacing around braces in the import statement improves code readability and follows TypeScript formatting conventions.
38-47: Well-structured SDK References integration.The new "SDK References" category with autogenerated items from the
sdk_refdirectory properly integrates the API documentation into the sidebar navigation. The positioning before the existing "Reference" section is logical.docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx (1)
1-9: Consistent documentation pattern for empty modules.This file follows the same well-structured approach as other empty module documentation, maintaining consistency across the SDK reference documentation.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx (1)
10-14: Looks good – generated snippet renders correctlyHeading hierarchy, GitHub source link and the signature block are all well-formed.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx (1)
10-15: Nice – short but self-contained explanationThe brief paragraph clarifies why the context exists. No issues spotted.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx (1)
10-14: Parameter name looks off – please verifyThe signature shows
load_configuration(value: str), yet the description speaks about a configuration file path.
If the parameter is indeed a file path, consider renaming it in the source code (and consequently in the generated docs) to something clearer likeconfig_pathorfile_pathto improve self-documentation.docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx (1)
14-18: Small type-hint polish
list[str]works only on Python 3.9+. If the SDK still supports 3.8, the canonical hint would beList[str]withfrom typing import List.
Double-check the supported Python versions and adjust the docstring generator accordingly to avoid mismatches between documentation and runtime type hints.docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx (1)
1-4: Front-matter looks correct. Nothing else to flag.docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx (1)
1-4: No issues detected.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx (1)
10-14: Good, concise reference.No problems spotted.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx (1)
6-18: Looks good – exception list renders correctly.docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx (1)
8-37: Looks goodHeaders, code fences, and descriptions render correctly and link back to source.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx (1)
1-37: Auto-generated reference – no manual issues detectedNo actionable feedback; looks mechanically correct.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx (1)
1-31: Auto-generated reference – no manual issues detectedNothing to flag.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx (1)
1-25: Auto-generated reference – no manual issues detectedNothing to flag.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx (1)
1-333: Extensive auto-generated listing – no manual issues detectedSkipping detailed review of mechanically-generated protocol index.
.github/workflows/ci.yml (1)
183-218: Fail CI on new or deleted SDK docs in CI workflowThe current step only checks tracked modifications. New or removed files under
SDK_API_DOCS_DIRwon’t be caught, allowing documentation drift to slip through.Please update
.github/workflows/ci.ymlaround lines 183–218 as follows:- name: "Check if SDK API documentation needs to be refreshed" run: | - git diff --quiet "${SDK_API_DOCS_DIR}" + # Fail on modified, deleted, or new files inside the docs dir + if ! git diff --quiet -- "${SDK_API_DOCS_DIR}" || \ + [ -n "$(git ls-files --others --exclude-standard "${SDK_API_DOCS_DIR}")" ]; then + echo "SDK API documentation is out-of-date. Run '${DOCS_COMMAND}' and commit the changes." >&2 + git status --short "${SDK_API_DOCS_DIR}" || true + exit 1 + fi.fix_required
docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx (1)
1-53: LGTM! Well-structured auto-generated API documentation.The generated MDX documentation is properly formatted with clear class and method documentation, appropriate GitHub source links, and consistent structure.
tasks.py (1)
260-305: Well-implemented SDK API documentation generation task.The implementation effectively handles:
- Proper error handling for missing mdxify tool
- Clean temporary directory usage
- Intelligent file filtering and reorganization
- Robust directory structure creation
The file reorganization logic using
reduce(operator.truediv, ...)is elegant for converting flat filenames with hyphens into nested directory structures.docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx (1)
1-140: LGTM! Comprehensive auto-generated API documentation.The documentation thoroughly covers all classes and methods in the query_groups module with clear descriptions, method signatures, and GitHub source links. The structure is consistent with other generated documentation files.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx (1)
1-70: LGTM! Excellent auto-generated documentation with helpful implementation guidance.The documentation is well-structured and includes particularly valuable implementation guidance for the abstract
generate()method, explaining the expected idempotent behavior and usage patterns.docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx (1)
1-37: LGTM! Documentation properly organized in nested directory structure.The auto-generated documentation is well-formatted and demonstrates that the file reorganization logic in the tasks.py implementation correctly handles nested module structures.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx (1)
10-10:<Icon … />component may fail at build time without an importMDX requires the component to be either globally registered or explicitly imported.
If the docs site does not configureIconas a global, addimport { Icon } from '@site/src/components/Icon';at the top via the generator to prevent the Docusaurus build from breaking.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx (1)
10-12: Ensure theIconcomponent is resolvable at build time
<Icon>is used, but the file does not import it. Unless you rely on a global MDX provider, add an explicit import to avoid MDX compile-time errors:--- title: python_transform sidebarTitle: python_transform --- +import { Icon } from '@iconify/react';Please confirm that the Docusaurus config or a remark/rehype plugin already provides
Icon; otherwise, the docs build will break.docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx (1)
1-12: Documentation looks solidFront-matter, headings, and GitHub source links render correctly; nothing stands out as problematic.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx (1)
1-8: LGTM – config module reference reads wellStructure, code fences and links look correct.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx (1)
1-12: Timestamp docs are clear and consistentNo issues spotted in formatting or content.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx (1)
10-18: Relationship manager docs look goodThe class hierarchy and method listings are rendered correctly.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx (1)
6-10: Documentation looks solidHeadings, code fences, and links render correctly. No issues spotted.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx (1)
6-10: Well-structured referenceClear class listing and source links—nothing to flag.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx (1)
6-10: Comprehensive & accurateThe function/class signatures and links are correct; no issues detected.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx (1)
18-44: LGTM – rich auto-generated referenceThe section cleanly lists all schema helpers and links back to source. No issues spotted.
| ### `run` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/ctl/generator.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | ||
|
|
||
| ```python | ||
| run(generator_name: str, path: str, debug: bool, list_available: bool, branch: str | None = None, variables: Optional[list[str]] = None) -> None | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Clarify optional arguments & side-effects
The signature shows branch and variables as optional, but the docs do not explain default behaviours (e.g. which branch is used when None). Also mention whether run mutates the working directory or writes files so users can anticipate side-effects.
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx around lines 10
to 14, clarify the behavior of the optional parameters `branch` and `variables`
in the `run` function signature by explaining what default branch is used when
`branch` is None and how `variables` are handled if not provided. Additionally,
document any side-effects of the `run` function, such as whether it mutates the
working directory or writes files, so users understand the impact of calling
this function. Update the docstring or surrounding text accordingly to include
these details.
| #### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | ||
|
|
||
| ```python | ||
| hfid(self) -> list[Any] | None | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent return-type in signature – should be list[str], not list[Any].
The hfid() method on RelatedNodeBase is documented here as returning list[Any] | None, whereas the same method on CoreNodeBase (and in the source code) returns list[str] | None. The mismatch will confuse users and hints at a potential doc-generation bug.
- hfid(self) -> list[Any] | None
+ hfid(self) -> list[str] | None📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| #### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | |
| ```python | |
| hfid(self) -> list[Any] | None | |
| ``` | |
| #### `hfid` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/protocols_base.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> | |
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx around lines 20
to 25, the return type of the hfid() method is incorrectly documented as
list[Any] | None. Update the return type annotation to list[str] | None to match
the CoreNodeBase method and the source code, ensuring consistency and avoiding
user confusion.
Deploying infrahub-sdk-python with
|
| Latest commit: |
a0a8686
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d27fc507.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://ady-add-api-doc-generation.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests.
@@ Coverage Diff @@
## stable #481 +/- ##
==========================================
- Coverage 75.83% 69.99% -5.85%
==========================================
Files 100 100
Lines 8870 8821 -49
Branches 1740 1727 -13
==========================================
- Hits 6727 6174 -553
- Misses 1667 2168 +501
- Partials 476 479 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 24 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)
51-60: Typo & argument-name mismatch
ValidationErorris misspelled.- The Args section refers to
config_file_name, but the signature exposesconfig_file.-This is done to handle a ValidationErorr which is raised when settings are specified but invalid. +This is done to handle a ValidationError which is raised when settings are specified but invalid. @@ -• `config_file_name`: [description]. Defaults to "pyprojectctl.toml". +• `config_file`: [description]. Defaults to "infrahubctl.toml".
♻️ Duplicate comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)
505-515: Duplicate typo in sync-client sectionSame typo as above appears in the synchronous
execute_graphqldescription.-If retry_on_failure is True, the query will retry until the server becomes reacheable. +If `retry_on_failure` is `True`, the query will keep retrying until the server becomes reachable.
🧹 Nitpick comments (7)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (1)
24-68: Consistent punctuation for method descriptions
debug,info,warning,critical, andexceptionend their description sentences without a period, whereaserrorends with one. Use a uniform style for all six docstrings.-Send a error event. +Send an error event…and either add or remove the trailing period on the other five lines to match.
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1)
50-57: Duplicate description – consider removing one
InvalidResponseError(L54-56) repeats exactly the text already used forUninitializedError(L50-52). Either adjust the wording or remove the duplicate to avoid confusion.docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (1)
148-154: Minor grammar / wording fixes
If branch isn't provide➜If a branch isn't providedmay seam counter intuitive➜may seem counter-intuitiveCurrently the function support➜Currently the function supports-If branch isn't provide, return the name of the local Git branch. +If a branch isn't provided, return the name of the local Git branch. -This implementation may seam counter intuitive but in the current implementation +This implementation may seem counter-intuitive, but in the current implementation -Currently the function support Fields and InlineFragments but in a combined tree +Currently the function supports Fields and InlineFragments but in a combined treeAlso applies to: 186-192
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)
22-23: Simplify wording for clarity-Handle exception in a different fashion based on its type. +Handle exceptions differently depending on their type.docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (2)
42-46: Grammar tightening for the introductory paragraphMinor wording improvements for clarity & conciseness.
-Internal Store for InfrahubNode objects. - -Often while creating a lot of new objects, -we need to save them in order to reuse them later to associate them with another node for example. +Internal store for `InfrahubNode` objects. + +When creating many new objects, we often need to save them so they can be reused later—for example, to associate them with another node.
60-100: Consider collapsing the overload explosion forNodeStore.getEight consecutive overload signatures make the doc noisy and push relevant content far below the fold. A single canonical signature plus a table/paragraph explaining the parameter permutations would be easier to read and maintain.
This is purely a docs-generation choice (
mdxifysupports signature suppression/merging).
If you keep the current layout, expect frequent diffs when line numbers drift, increasing CI churn.docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)
258-268: Fix typo “reacheable” → “reachable”-If retry_on_failure is True, the query will retry until the server becomes reacheable. +If `retry_on_failure` is `True`, the query will keep retrying until the server becomes reachable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (49)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx(1 hunks)tasks.py(2 hunks)
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx
[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx
[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx
[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...
(IN_A_X_MANNER)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx
[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx
[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...
(A_LOT_OF)
[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...
(IN_ORDER_TO_PREMIUM)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx
[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx
[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
✅ Files skipped from review due to trivial changes (12)
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx
🚧 Files skipped from review as they are similar to previous changes (30)
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx
- tasks.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx
[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx
[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx
[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...
(IN_A_X_MANNER)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx
[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx
[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...
(A_LOT_OF)
[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...
(IN_ORDER_TO_PREMIUM)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx
[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx
[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: unit-tests (3.12)
- GitHub Check: unit-tests (3.9)
- GitHub Check: unit-tests (3.13)
- GitHub Check: unit-tests (3.10)
- GitHub Check: unit-tests (3.11)
- GitHub Check: integration-tests-latest-infrahub
🔇 Additional comments (1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (1)
345-356: Argument descriptions drift from actual parameters
allocate_next_ip_addresslists
timeout,tracker,raise_for_errorwith texts that clearly belong to pagination (offset,limit) rather than their real purpose.Please re-check the auto-generated docstrings or tweak the mdxify template so that each bullet matches the parameter it documents; otherwise users will be mis-guided.
360069a to
90a8edb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
Many things to improve but at least we have the foundation 👍🏼
| @@ -0,0 +1,10 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petercrocker do we need to add this component to Infrahub-docs as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's already there: https://github.com/opsmill/infrahub-docs/blob/894076746c6fa744dd1eca674d6eb25ccb1d95f0/docs/package.json#L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I commented the wrong line in this file
I meant "@iconify/react" and the Icon component
|
please don't forget to add a fragment for the changelog |
9a0e63e to
bfe7baf
Compare
|
The only failing CI check is about documentation style using Vale. The thing is, it does not like some of the tokens that are used in Google style docstrings (like I am not sure if it is relevant to have it run on doc files generated from the code. I would suggest excluding the newly generated doc path from Vale surveillance. Otherwise, we would have to add a lot of spelling exceptions over time that I don't find very relevant. |
|
…nerated docs in invoke command
7d1c06f to
fb08b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (10)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx (2)
8-18: Add class-level descriptions for better usabilityOnly
InfrahubLoggercontains a description; every other class is listed without any context. Readers landing on this page have no idea what aSyncRequester,Order, etc. represent. Please generate at least a one-liner per class – you already have the source links so a short summary is easy to pull from docstrings.
54-68: Avoid repetitive “Send a … event.” sentencesSix consecutive method descriptions start with “Send a … event.” and add no real value. Either omit the sentence (the method name is self-explanatory) or replace it with specific behaviour notes (e.g. “Logs at DEBUG level through the configured Infrahub logger”).
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx (1)
56-60: Parameter names do not match the actual signatureThe Args section lists
config_file_name, while the signature isload_and_exit(..., config_file='infrahubctl.toml', ...). Please update the parameter list to match the code or the generated docs will mislead users.docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx (1)
30-38: Document intent for exceptions that only have a nameMany exceptions (e.g.
SchemaNotFoundError,ModuleImportError) are listed with zero description. A single-sentence rationale (“Raised when …”) greatly improves searchability and DX. Consider pulling the first line of each class docstring into the MDX.docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx (2)
188-192: Typo: “seam” → “seem”-This implementation may seam counter intuitive +This implementation may seem counter-intuitive
226-229: Minor wording“between a timedate in string format and now.” → “between a date-time string and now.”
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx (1)
22-24: Tighten phrasing“Handle exception in a different fashion based on its type.” → “Handle exceptions differently depending on their type.”
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx (1)
44-45: Streamline wording for better readabilityThe phrasing is a bit verbose and uses the patterns “a lot of” / “in order to”, which can be tightened up.
-Often while creating a lot of new objects, -we need to save them in order to reuse them later to associate them with another node for example. +Often when creating many new objects, we need to persist them so they can be reused later—for example, to associate them with another node.docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)
258-259: Fix typo “reacheable” → “reachable”-If retry_on_failure is True, the query will retry until the server becomes reacheable. +If `retry_on_failure` is **True**, the query will retry until the server becomes **reachable**.
504-505: Same typo re-appears – correct it here as well-If retry_on_failure is True, the query will retry until the server becomes reacheable. +If `retry_on_failure` is **True**, the query will retry until the server becomes **reachable**.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
docs/package-lock.jsonis excluded by!**/package-lock.jsonpoetry.lockis excluded by!**/*.lock
📒 Files selected for processing (104)
.github/workflows/ci.yml(4 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx(1 hunks)docs/package.json(1 hunks)docs/sidebars-python-sdk.ts(2 hunks)docs/src/theme/MDXComponents.js(1 hunks)infrahub_sdk/client.py(6 hunks)infrahub_sdk/ctl/utils.py(1 hunks)infrahub_sdk/jinja2.py(1 hunks)infrahub_sdk/node/node.py(1 hunks)infrahub_sdk/pytest_plugin/items/base.py(1 hunks)pyproject.toml(1 hunks)tasks.py(2 hunks)
✅ Files skipped from review due to trivial changes (38)
- infrahub_sdk/pytest_plugin/items/base.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/data.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/constants.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/transform.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/repository.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/interface.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exceptions.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/interface.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/exceptions.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/context.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/queries.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/exceptions.mdx
- docs/src/theme/MDXComponents.js
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/object.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/groups.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/client.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/utils.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exporter.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/models.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/async_typer.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/plugin.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/loader.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/playback.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/schema.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/graphql_query.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/operation.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/branch.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/models.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/check.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/importer/json.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/repository.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/animal.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/branch.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli_commands.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/object.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_base.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
🚧 Files skipped from review as they are similar to previous changes (59)
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/constants.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/constants.mdx
- infrahub_sdk/ctl/utils.py
- infrahub_sdk/node/node.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/template/filters.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/constants.mdx
- docs/sidebars-python-sdk.ts
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/exceptions.mdx
- infrahub_sdk/jinja2.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/constants.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/cli.mdx
- pyproject.toml
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/property.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/parameters.mdx
- docs/package.json
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/generator.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/schema_sorter.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/object_store.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/parsers.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/models.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/spec/menu.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/menu.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/task/manager.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transforms.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/docker.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/jinja2.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/validate.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/exceptions.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/analyzer.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/repository.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/diff.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/importer.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/main.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/check.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/recorder.mdx
- .github/workflows/ci.yml
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/uuidt.mdx
- infrahub_sdk/client.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/python_transform.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/topological_sort.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/render.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/protocols_generator/generator.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/query_groups.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/transfer/exporter/json.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/yaml.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/generator.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/jinja2_transform.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/timestamp.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/checks.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/pytest_plugin/items/base.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/related_node.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/batch.mdx
- tasks.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/graphql.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/config.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/testing/schemas/car_person.mdx
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/schema/repository.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx
[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx
[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/utils.mdx
[style] ~22-~22: Consider replacing this phrase with the adverb “differently” to avoid wordiness.
Context: ... int) -> NoReturn ``` Handle exception in a different fashion based on its type. ### `catch_exceptio...
(IN_A_X_MANNER)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/exceptions.mdx
[style] ~51-~51: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...dth: 14px; height: 14px;" /> Raised when an object requires an initializati...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/store.mdx
[style] ~44-~44: Consider using a synonym to be more concise.
Context: ...ahubNode objects. Often while creating a lot of new objects, we need to save them in or...
(A_LOT_OF)
[style] ~45-~45: Consider a more concise word here.
Context: ...ot of new objects, we need to save them in order to reuse them later to associate them with...
(IN_ORDER_TO_PREMIUM)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/types.mdx
[style] ~59-~59: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send a critical event. #### exception <su...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~67-~67: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...one, *args: Any, **kw: Any) -> Any ``` Send an exception event. ### Order <...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/utils.mdx
[grammar] ~95-~95: Ensure spelling is correct
Context: ...tion of both - the item present only in list1 - the item present only in list2 ### `...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~96-~96: Ensure spelling is correct
Context: ...nly in list1 - the item present only in list2 ### deep_merge_dict python deep_merge_dict(dicta: dict, dictb: dict, path: list | None = None) -> dict Deep Merge Dictionary B into Dictionary ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: unit-tests (3.10)
- GitHub Check: unit-tests (3.11)
- GitHub Check: unit-tests (3.13)
- GitHub Check: integration-tests-latest-infrahub
- GitHub Check: unit-tests (3.12)
🔇 Additional comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)
789-792: Parameter name mismatch:sizevsprefix_lengthThe docstring refers to
size, but the function signature exposesprefix_length. Confirm which name is authoritative and update either the signature or the bullet list so they match.
345-355: Several parameter descriptions don’t match their actual meaning
timeout,tracker, andraise_for_errorbullets look copy-pasted:
timeoutis described as “populate the store…”, which is unrelated.trackeris labelled “offset for pagination”.raise_for_erroris labelled “limit for pagination”.Please revise these descriptions to reflect the real semantics or regenerate the docs with the correct metadata.
| Calls load, but wraps it in a try except block. | ||
|
|
||
| This is done to handle a ValidationErorr which is raised when settings are specified but invalid. | ||
| In such cases, a message is printed to the screen indicating the settings which don't pass validation. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix misspelling of ValidationError
ValidationErorr is misspelled and will show up in rendered docs as-is.
-This is done to handle a ValidationErorr which is raised when settings are specified but invalid.
+This is done to handle a ValidationError which is raised when settings are specified but invalid.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Calls load, but wraps it in a try except block. | |
| This is done to handle a ValidationErorr which is raised when settings are specified but invalid. | |
| In such cases, a message is printed to the screen indicating the settings which don't pass validation. | |
| Calls load, but wraps it in a try except block. | |
| This is done to handle a ValidationError which is raised when settings are specified but invalid. | |
| In such cases, a message is printed to the screen indicating the settings which don't pass validation. |
🧰 Tools
🪛 LanguageTool
[grammar] ~53-~53: Ensure spelling is correct
Context: ...except block. This is done to handle a ValidationErorr which is raised when settings are speci...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/ctl/config.mdx around lines 51 to
55, correct the misspelling of "ValidationErorr" to "ValidationError" in the
text to ensure the error name is spelled correctly and renders properly in the
documentation.
Ok, that's done ! |
Done as well ! |
| run: ${{ env.DOCS_COMMAND }} | ||
| - name: "Check if SDK API documentation needs to be refreshed" | ||
| run: | | ||
| git diff --quiet ${SDK_API_DOCS_DIR} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add this as an invoke command too so that it's consistent with how we do it in other repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate a bit about which part here you'd add as an invoke command ?
For now, I added an invoke command to generate the API docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that we can run poetry run invoke generate-sdk-api-docs to generate the docs but then have another command to validate. It could simplify to also have a shortcut for the git diff like we have here:
https://github.com/opsmill/infrahub/blob/infrahub-v1.3.4/tasks/backend.py#L176
This part isn't critical though just a suggestion.
|
|
||
| ## Classes | ||
|
|
||
| ### `GraphQLQueryVariable` <sup><a href="https://github.com/opsmill/infrahub-sdk-python/blob/main/infrahub_sdk/analyzer.py#L20" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of these links to the main branch along with a line number. Looking at the published docs https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/analyzer#graphqlqueryvariable- I can't actually see the these links on the page. But they are available in the source. I think we'd need to get rid of them to avoid conflicts as well as having a link that points to an incorrect branch.
If possible it could make sense to have this point to the current version at build time so that we have a link to a tagged release instead of a branch where the line numbers as well as overall structure of the file might change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is about docusaurus configuration because the FastMCP doc partake of those links while they don't appear in our documentation.
Mdxify lib provides us with a CLI arg to properly point at the desired git branch (might also work with any git ref but not sure about this) in generated code links. Do you want to leverage this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say there are two issues the first is that the links are currently broken due to the main branch reference. The second is that as I can't even see the links on the website I don't think they fill a need. It might be because the icon for Github is missing so there's nothing to click on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I'd suggest that we start with a smaller scale and document the InfrahubClient classes as well as InfrahubNode and then curate the classes that we want to, later it could perhaps be based on file locations.
I think that we have too many public methods exposed today which we probably don't want to have documented like this.
Some of them could be confusing for a user such as: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/ctl/branch The functions under the CTL shouldn't really be used by end users directly but consumed by infrahubctl. I'm afraid that AI agents will make assumptions based of function names like this and generate faulty code as a result. Alternatively that "internal" functions are used in ways that might break when we change the code in future SDK versions. Also with things like https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/constants that doesn't provide as much value as other pages it just adds noise.
Some of the output might be a bit confusing for humans when looking at for example the client.get method: https://5390d612.infrahub-sdk-python.pages.dev/python-sdk/sdk_ref/infrahub_sdk/client#get- most of these listings would be for @overload methods but it's not quite clear by looking at the docs. If possible it would be nice if we could mark the ones that are overload methods.
I agree with this. Do you have a list of modules to include/exclude ? |
|
Also, regarding decorators, this is a thing we already started discussing with Damien. We opened an issue on mdxify to start a discussion around this. |
For the first iteration perhaps InfrahubClient, InfrahubClientSync, InfrahubNode and InfrahubNodeSync. If we have an easy way to just update it later that should be enough to add more as a follow up step. |
Just a precision, mdxify works on a module basis. So I found the proper modules, but the full generation is generated for everything that's inside it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (2)
414-416: Copy-paste artefacts leak into IP-prefix docsSame pagination wording is repeated here; fix as in previous comment.
736-739: Syncallocate_next_ip_addressdocs – incorrect parameter detailsReplicate the correction applied to the async variant for
timeout,tracker, andraise_for_error.
🧹 Nitpick comments (4)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx (4)
34-44: Duplicaterequest_contextentries create noiseBoth the getter and the setter show up under the exact same heading. Consider renaming one of the headings (e.g. “request_context ‑ getter” / “request_context ‑ setter”) or grouping them in a single section to avoid reader confusion.
88-105: Overload explosion – collapse identicalcreate()signaturesSeven overload blocks are rendered back-to-back, yet only two logical variants exist (“kind as
str” and “kind asSchemaType”). The current dump overwhelms the page and makes the real API harder to grasp.Diff-style proposal (keep only meaningful variants – pseudo code):
-### `create` -```python -create(self, kind: str, data: dict | None = ..., ...) -``` -### `create` -```python -create(self, kind: type[SchemaType], data: dict | None = ..., ...) -``` -... +### `create` +```python +create( + self, + kind: str | type[SchemaType], + data: dict | None = None, + *, + branch: str | None = None, + timeout: int | None = None, + **kwargs: Any, +) -> InfrahubNode | SchemaType +```This reduces clutter while fully describing the callable.
259-259: Spelling: “reachable”
reacheable→reachable.
505-505: Spelling: “reachable” (sync variant)
reacheable→reachable.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx(1 hunks)docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx(1 hunks)tasks.py(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- tasks.py
- docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx
🧰 Additional context used
🪛 LanguageTool
docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx
[grammar] ~259-~259: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~505-~505: Ensure spelling is correct
Context: ...ery will retry until the server becomes reacheable. Args: - query: GraphQL Query to...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
| - `timeout`: Flag to indicate whether to populate the store with the retrieved nodes. | ||
| - `tracker`: The offset for pagination. | ||
| - `raise_for_error`: The limit for pagination. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong parameter descriptions for allocate_next_ip_address
timeout, tracker, and raise_for_error are described as pagination concepts, which is inaccurate and misleading.
-`timeout`: Flag to indicate whether to populate the store with the retrieved nodes.
-`tracker`: The offset for pagination.
-`raise_for_error`: The limit for pagination.
+`timeout`: Overrides the default request timeout (seconds).
+`tracker`: Identifier used for request tracing / correlation.
+`raise_for_error`: If True, raise an exception when GraphQL returns errors.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `timeout`: Flag to indicate whether to populate the store with the retrieved nodes. | |
| - `tracker`: The offset for pagination. | |
| - `raise_for_error`: The limit for pagination. | |
| - `timeout`: Overrides the default request timeout (seconds). | |
| - `tracker`: Identifier used for request tracing / correlation. | |
| - `raise_for_error`: If True, raise an exception when GraphQL returns errors. |
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx around lines 353 to 356,
the parameter descriptions for `allocate_next_ip_address` incorrectly describe
`timeout`, `tracker`, and `raise_for_error` as pagination-related. Update these
descriptions to accurately reflect their actual purpose and usage in the method,
removing any references to pagination concepts.
| - `size`: Length of the prefix to allocate. | ||
| - `member_type`: Member type of the prefix to allocate. | ||
| - `prefix_type`: Kind of the prefix to allocate. | ||
| - `data`: A key/value map to use to set attributes values on the allocated prefix. | ||
| - `branch`: Name of the branch to allocate from. Defaults to default_branch. | ||
| - `timeout`: Flag to indicate whether to populate the store with the retrieved nodes. | ||
| - `tracker`: The offset for pagination. | ||
| - `raise_for_error`: The limit for pagination. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size vs prefix_length mismatch
The Args section suddenly refers to size, but the actual parameter is prefix_length. Update the name to avoid confusion.
-`size`: Length of the prefix to allocate.
+`prefix_length`: Length of the prefix to allocate.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `size`: Length of the prefix to allocate. | |
| - `member_type`: Member type of the prefix to allocate. | |
| - `prefix_type`: Kind of the prefix to allocate. | |
| - `data`: A key/value map to use to set attributes values on the allocated prefix. | |
| - `branch`: Name of the branch to allocate from. Defaults to default_branch. | |
| - `timeout`: Flag to indicate whether to populate the store with the retrieved nodes. | |
| - `tracker`: The offset for pagination. | |
| - `raise_for_error`: The limit for pagination. | |
| - `prefix_length`: Length of the prefix to allocate. | |
| - `member_type`: Member type of the prefix to allocate. | |
| - `prefix_type`: Kind of the prefix to allocate. | |
| - `data`: A key/value map to use to set attributes values on the allocated prefix. | |
| - `branch`: Name of the branch to allocate from. Defaults to default_branch. | |
| - `timeout`: Flag to indicate whether to populate the store with the retrieved nodes. | |
| - `tracker`: The offset for pagination. | |
| - `raise_for_error`: The limit for pagination. |
🤖 Prompt for AI Agents
In docs/docs/python-sdk/sdk_ref/infrahub_sdk/client.mdx around lines 791 to 799,
the Args section uses the parameter name `size` which does not match the actual
parameter name `prefix_length`. Update all occurrences of `size` to
`prefix_length` in this section to ensure consistency and avoid confusion.
Provide the basics for automatic Infrahub SDK API documentation generation:
mdxifypackage to the dependenciespoetry run invoke generate-sdk-api-docsSummary by CodeRabbit
New Features
Chores
Documentation